<extend name="Public/base"/>
<block name="body">

<div class="page-crumb">
	<div class="ui-ctrl ui-crumb"><span class="ui-crumb-node ui-crumb-node-first ui-crumb-node-last">代码位管理</span></div>
</div>

<div class="ui-nav-tab">
	<a class="nav-item state-active" href="/code/index" data-pjax>代码位管理</a>
	<a class="nav-item" href="/codeGroup/index" data-pjax>代码位分组管理</a>
</div>

<div class="layui-main">
	<div class="list-meta">
		<div class="list-action">
			<a class="ui-link skin-add-link" href="javascript:;" onclick="PopModel.openFrame('/Code/create');" target="">新建代码位</a>
        </div>
		
		<div class="list-filter">
		
			<div class="list-batch-operation">
				<a href="javascript:;" class="ui-button state-disabled">停用</a>
				<a href="javascript:;" class="ui-button state-disabled">删除</a>
				<a href="javascript:;" class="ui-button state-disabled">启用</a>
			</div>
			
			<div class="list-filter-fields">
				<a href="javascript:;" class="ui-button select-button">筛选</a>
			</div>
			
		</div>
	</div>
	
	<!-- 数据列表 -->
		<table class="layui-table list-content-table" lay-skin="nob">
			<colgroup>
				<col width="20">
				<col width="150">
				<col width="150">
				<col width="100">
				<col width="80">
				<col width="80">
				<col width="80">
				<col width="100">
				<col width="100">
			</colgroup>
			<thead class="list-table-head">
				<tr>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text ui-table-hcell-text-first">
							<input type="checkbox" class="ui-table-select-all" data-index="">
						</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">代码位名称</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">所属媒体</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">标签</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">状态</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">尺寸</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">类型</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">更新时间</div>
					</th>
					<th class="ui-table-hcell">
						<div class="ui-table-hcell-text">操作</div>
					</th>
				</tr> 
		  </thead>
		  
		  <tbody class="list-table-body">
				<foreach name="data" item="value">
					<tr>
						<td class="ui-table-cell">
							<div class="ui-table-cell-text">
								<input type="checkbox" class="ui-table-multi-select" data-id="{$value.id}">
							</div>
						</td>
						<td class="ui-table-cell">
							<div class="ui-table-cell-text">
								{$value.code_name}
								<span class="table-content-addition">ID: {$value.id}</span>
							</div>
						</td>
						<td class="ui-table-cell">
							<div class="ui-table-cell-text">
								{$value.name}
								<span class="table-content-addition">ID: {$value.media_id}</span>
							</div>
						</td>
						<td class="ui-table-cell"><div class="ui-table-cell-text">{$value.tag}</div></td>
						 <td class="ui-table-cell">
	                        <div class="ui-table-cell-text">
	                            <if condition="$value.status eq 1">
	                                <span class="table-status-activated">启用</span>
	                            <elseif condition="$value.status eq 0"/>
	                                <span class="table-status-inactive">禁用</span>
	                           </if>
	                        </div>
                    	</td>
						
						<td class="ui-table-cell"><div class="ui-table-cell-text">{$value.width}*{$value.height}</div></td>
						<td class="ui-table-cell"><div class="ui-table-cell-text">H5</div></td>
						<td class="ui-table-cell"><div class="ui-table-cell-text">{$value.update_time|date="Y-m-d H:i",###}</div></td>
						<td class="ui-table-cell">
							<div class="ui-table-cell-text">
								<span class="table-operation" data-command="modify" data-command-args="{$value.id}">编辑</span>
								<span class="table-operation" data-command="remove" data-command-args="{$value.id}">删除</span>
							</div>
						</td>
					</tr>
				</foreach>
		  </tbody>
		  
		</table> 
		{$page}
		<script src="__BACKEND_STATIC__/js/code/code.js"></script>
</div>
</block>
